Print the full anyhow context chain in error messages - #12882
Merged
rerun-sync[bot] merged 1 commit intoAug 12, 2026
Conversation
`anyhow::Error`'s `Display` only prints the outermost context, hiding the
root cause. Use the alternate format (`{:#}`), which walks the whole chain,
in the places where an `anyhow::Error` was being flattened.
Fixes part of rerun-io#8681
Contributor
There was a problem hiding this comment.
Hi! Thanks for opening this pull request.
Because this is your first time contributing to this repository, make sure you've read our Contributor Guide and Code of Conduct.
grtlr
approved these changes
Aug 12, 2026
Member
|
@rerun-bot sync-reality |
Contributor
|
Sync complete. Mirror PR in reality: https://github.com/rerun-io/reality/pull/3119 Triggered by @grtlr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
anyhow::Error'sDisplayimpl only prints the outermost context, so the root cause is silently dropped (#8681). The alternate format,{:#}, walks the whole chain instead.This fixes the places where an
anyhow::Errorwas being flattened:re_mcap::Error::InvalidSchema—{source}→{source:#}re_mcap::Error::Other—#[error(transparent)]→#[error("{0:#}")]re_mcap::parsers::cdr::CdrError::Other—{0}→{0:#}re_parquet::ParquetError::Other—#[error(transparent)]→#[error("{0:#}")]re_server'sError::RrdLoadingError—{0}→{0:#}AddrInUsewarning inentrypoint.rsThis matches the pattern already used elsewhere in the codebase (
ChunkStoreError::VideoRebatchuses{0:#}, andre_query/re_importer/re_lerobotusere_error::format).The
#[from]attribute still designates the field as the errorsource(), so replacingtransparentwith an explicit format string does not break source chaining.Part of #8681.